#! /bin/bash
echo '-----------------$0,$1,$2, each parameter'
echo 'res: ' $0 $1 $2

echo ''
echo '-----------------$#, num of parameters'
echo 'res: ' $#

echo ''
echo '-----------------$*, all of parameters'
echo 'res: ' $*

echo ''
echo '-----------------$@, all of parameters'
echo 'res: ' $@

echo ''
echo '-----------------$*, for every parameter'
for var in $*
do
  echo $var
done

echo ''
echo '-----------------$@, for every parameter'
for var in $@
do
  echo $var
done
